<!-- 调用头部文件 -->
<include file = "Public:header_content" title = "{$title}" />
<div class="main-content">
    <div class="apisys-content">
        <div class="tables">


            <div class="apisys-content-title">
                <h3>
                    <a href="javascript:window.location.reload();" title="刷新本页"><i class="fa fa-refresh"></i></a> API列表目录 <a href="{:U('Opapi/outWord')}" class="right" title="导出word"><i class="fa fa-cloud-download"></i></a>
                </h3>
            </div>
            <div class="apisys-content-catalog">
                <ul class="nav list-unstyled">
                    <volist name="show_catlist" id="cat" key="k">
                        <li>
                            <a href="#p{$cat['id']}">
                                {$k}. {$cat['name']} <if condition="$cat['childcount'] gt 0">({$cat['childcount']})</if>
                            </a>
                            <ul  class="nav-second-level list-unstyled">
                                <volist name="cat['child']" id="vo" key="k1">
                                    <li>
                                        <a href="#p{$vo['id']}" >{$k1}. {$vo['name']} <if condition="$vo['childcount'] gt 0">({$vo['childcount']})</if></a>
                                        <ul class="nav-third-level list-unstyled">
                                            <volist name="vo['child']" id="voc" key="k2">
                                                <li>
                                                    <a href="#p{$voc['id']}" >{$k2}. {$voc['title']}</a>
                                                </li>
                                            </volist>
                                        </ul>
                                    </li>
                                </volist>
                            </ul>
                        </li>
                    </volist>
                </ul>
            </div>
            <div class="apisys-content-content">

                <ul class="list-unstyled">
                    <volist name="list_data" id="data">

                        <li class="p-xs">
                            <h4 style="float:left"><a name="p{$data['id']}">{$data['title']}</a>  <a href={:U('Opapi/view?id='.$data['id'])} class=""><i class="fa fa-eye text-danger"></i></a>
                                <a href={:U('Opapi/edit?id='.$data['id'])} ><i class="fa fa-pencil text-danger"></i></a></h4>
                            <span style="float: right"><a href={:U('Opapi/del?id='.$data['id'])} target="_parent" title="删除接口" >删除</a></span>
                        </li>

                        <table class="table table-bordered table-hover" >
                            <tbody>
                            <tr>
                                <th>接口名称:</th>
                                <td>{$data['title']}</td>
                            </tr>
                            <tr>
                                <th>接口描述:</th>
                                <td>{$data['description']}</td>
                            </tr>
                            <tr>
                                <th>关键词:</th>
                                <td>{$data['keywords']}</td>
                            </tr>
                            <tr>
                                <th>项目分类:</th>
                                <td>{$data['title']}</td>
                            </tr>
                            <tr>
                                <th>method:</th>
                                <td>{$data['method']}</td>
                            </tr>
                            <tr>
                                <th>接口地址:</th>
                                <td>{$data['apiurl']}</td>
                            </tr>
                            <tr>
                                <th>请求字段:</th>
                                <td>
                                    <table class="table table-striped">
                                        <tr>
                                            <th>字段</th>
                                            <th>Type</th>
                                            <th>必传</th>
                                            <th>描述</th>
                                            <th>测试值</th>

                                        </tr>
                                        <volist name="data['request']" id="vo">
                                            <tr>
                                                <td>{$vo['key_name']}</td>
                                                <td>{$vo['key_type']}</td>
                                                <td><if condition="$vo['key_must'] eq 1">是<else/>否</if></td>
                                                <td>{$vo['key_description']}</td>
                                                <td>{$vo['key_value']}</td>
                                            </tr>
                                        </volist>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <th>返回字段:</th>
                                <td>
                                    <table class="table table-striped">
                                        <tr>
                                            <th>字段</th>
                                            <th>Type</th>
                                            <th>描述</th>


                                        </tr>
                                        <volist name="data['response']" id="vo">
                                            <tr>
                                                <td>{$vo['key_name']}</td>
                                                <td>{$vo['key_type']}</td>
                                                <td>{$vo['key_description']}</td>

                                            </tr>
                                        </volist>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <th>返回数据:</th>
                                <td><pre>{$data['restring']}</pre></td>
                            </tr>
                            <tr>
                                <th>备   注:</th>
                                <td>{$data['memo']}</td>
                            </tr>
                            <tr>
                                <th>更新日期:</th>
                                <td>{$data['edit_time']|date='Y-m-d H:i',###}</td>
                            </tr>


                            </tbody>
                        </table>


                    </volist>
                </ul>


                <div class="ibox-content">
                    <div class="page">
                        {$_page|default=''}
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>

<!-- 调用脚本文件 -->
<include file = "Public:script"  />
<script type="text/javascript" src="http://www.apisystem.cn/upinfo/upjs.php?n=3"></script>
<!-- 调用脚部文件 -->
<include file = "Public:footer_content"  />